package pojo;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

/**
 * 
 * @author zgy
 * 
 */
@Repository
public class ZcOrderLog implements RowMapper<ZcOrderLog>, Serializable {

	private Integer id;
	private String userMp;
	private String orderNum;
	private Timestamp logTime;
	private String log;
	
	public ZcOrderLog() {
		super();
		// TODO Auto-generated constructor stub
	}


	public ZcOrderLog(Integer id, String userMp, String orderNum,
			Timestamp logTime, String log) {
		super();
		this.id = id;
		this.userMp = userMp;
		this.orderNum = orderNum;
		this.logTime = logTime;
		this.log = log;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUserMp() {
		return userMp;
	}

	public void setUserMp(String userMp) {
		this.userMp = userMp;
	}

	public String getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(String orderNum) {
		this.orderNum = orderNum;
	}

	public Timestamp getLogTime() {
		return logTime;
	}

	public void setLogTime(Timestamp logTime) {
		this.logTime = logTime;
	}


	public String getLog() {
		return log;
	}


	public void setLog(String log) {
		this.log = log;
	}


	@Override
	public ZcOrderLog mapRow(ResultSet rs, int rowNum) throws SQLException {
		ZcOrderLog e=new ZcOrderLog();
		e.setUserMp(rs.getString("user_mp"));
		e.setLogTime(rs.getTimestamp("log_time"));
		e.setLog(rs.getString("log"));
		return e;
	}
	
	public Object[] insertObjecParams(){
		Object[] params = new Object[]{
				userMp,logTime,log,orderNum};
		return params;
	}

}
